
import service from '../request';

const controller="UserInfo"

/**
* 
* @param {*} data 
* @returns 
*/
function post(data:any):any {
    return service({
        method: 'post',
        url: controller,
        data: data,      
    })
}
/*
修改
*/
function put(data:any) :any{
    return service({
        method: 'put',
        url: controller,
        data: data,      
    })
}
/**
* 查找单个
* @param {*} data 
* @returns 
*/
function get(id:number) {
    return service({
        method: 'get',
        url: controller+"/"+id,
        // params: data,　　　　 
      
    }) 
}

/**
* 删除
* @param {*} data 
* @returns 
*/
function del(data:any):any {
    return service({
        method: 'delete',
        url: controller,
        params: data,　　　　 
      
    }) 
}
/**
 * 分页查询
 */
function Query(data:any):any{
    return service({
        method :'POST',
        url:controller+'/Query',
        params:data,
    })
}

function getAll():any{
    return service({
        method:'get',
        url:controller+'/getAll'
    })
}

export default{
    post,
    del,
    get,
    put,
    Query,
    getAll
}